<#include "/common/pager_style/commonForm.ftl" encoding="UTF-8">
<script type="text/javascript" src="${request.contextPath}/resources/FCKeditor/fckeditor.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/jquery/plugin/ajaxupload/ajaxfileupload.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/jquery/zyplugin/appplugins/jquery.appPlugins.js"></script>
<script type="text/javascript" src="${request.contextPath}/resources/artDialog/jquery.artDialog.source.js?skin=chrome"></script>
<script type="text/javascript" src="${request.contextPath}/resources/artDialog/plugins/iframeTools.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/ntkoocx.js"></script>
<script type="text/javascript" src="${request.contextPath}/week/deptDoc.js?version=201901075"></script>
<script type="text/javascript" src="${request.contextPath}/week/formStyle/weekRecord.js?version=201901032"></script>

<#-- 定义有哪些按钮 reset:重写 back:返回 -->
<style type="text/css">
.uploadstyle{
	margin-right:15px
	}
.pad{
	padding:10px;
}

.font_bk{border:1px solid #888888;}

.con {
        position: relative;
        float: left;
        height: 25px;
        left: 30%;
       	margin-top: 10px;
    }
    
.box {
        position: relative;
        float: left;
        left: -50%;
        width: 100px;
        height: 100px;
        background: lightcoral;
    }  
    
.aunit{
   		white-space: nowrap;
   	 	text-overflow: ellipsis;  
   	 	-o-text-overflow: ellipsis; 
   	 	overflow: hidden; 
		width: 33%;
    	float:left; list-style:none;
   } 
</style>

<#if editState="modify">
	<#if (!isHasSeal?exists || isHasSeal!="1")>
	<#assign buttonsName = {"submit":"提交","draftSave":"保存","seal":"盖章","back":"返回"}>
	<#else>
	<#assign buttonsName = {"submit":"提交","draftSave":"保存","reSeal":"重盖","back":"返回"}>
	</#if>
<#elseif editState="isDoing">
	<#assign buttonsName = {"agree":"办结","createWord":"打印表单","back":"返回"}>
<!--这里分2个 是因为也许需要最多半个月 修改分管领导-->
<#elseif editState="needDoing" && entityTitle = "最多半个月">
    <#if  (currentUser?exists&&currentUser.orgId?exists&&currentUser.orgId==7)>
	     <#assign buttonsName = {"isfinish":"提交","createWord":"打印表单","deal":"转收文","later":"申请延期","refuse":"不同意件申请","directReturn":"直接退回","changeFgLeader":"修改分管领导","back":"返回"}>
	<#else>
		 <#assign buttonsName = {"isfinish":"提交","createWord":"打印表单","later":"申请延期","refuse":"不同意件申请","directReturn":"直接退回","back":"返回"}>
	</#if>
<#elseif editState="needDoing" && entityTitle = "最多一星期">
	     <#assign buttonsName = {"isfinish":"提交","createWord":"打印表单","later":"申请延期","refuse":"不同意件申请","back":"返回"}>
<#elseif editState="isFinish">
<!--这里是B部门回收的地方-->
	     <#assign buttonsName = {"back":"返回"}>
<#elseif editState="isDoing1">
<!--这里是A部门回收的地方-->
	     <#assign buttonsName = {"back":"返回"}>		
<#elseif editState="isCoOperation">
	     <#assign buttonsName = {"xbIsfinish":"提交","createWord":"打印表单","back":"返回"}>
<#elseif editState="isOver" &&isHasAssess="0"&&IsCreateUser?? &&IsCreateUser="1">
	     <#assign buttonsName = {"assess":"完成评价", "back":"返回"}>
<#elseif editState="isOver" &&isHasAssess="1"&&IsCreateUser?? &&IsCreateUser="1">
	<#if entityTitle = "最多一星期">
	     <#assign buttonsName = { "back":"返回"}>
	<#else>
	     <#assign buttonsName = { "createWord":"打印表单","back":"返回"}>
	</#if>
<#elseif editState="isOver" &&IsCreateUser?? &&IsCreateUser="0">
	<#if entityTitle = "最多一星期">
	     <#assign buttonsName = { "back":"返回"}>
	<#else>
	     <#assign buttonsName = { "createWord":"打印表单","back":"返回"}>
	</#if>
<#else>
	<#if entityTitle = "最多一星期">
	     <#assign buttonsName = { "back":"返回"}>
	<#else>
	     <#assign buttonsName = { "createWord":"打印表单","back":"返回"}>
	</#if>	
</#if>

<#assign buttonsImage={"changeFgLeader":"detail.gif","deal":"check.gif","directReturn":"detail.gif","applyReturn":"detail.gif","createWord":"print.gif","assess":"detail.gif","seal":"detail.gif","updateFgLeader":"detail.gif","reSeal":"detail.gif","save1":"send.gif","xbIsfinish","send.gif","openAndHide":"detail.gif","coOperation":"view.gif","hisRecord":"view.gif","hisReview":"view.gif","refuse":"detail.gif","later":"detail.gif","again":"detail.gif","draft":"save.gif","add":"add.gif","agree":"detail.gif","isfinish":"detail.gif","recovery":"detail.gif","lwRecovery":"detail.gif"}>		

<#if editState!="modify"&&editState!="isCoOperation">
    <#assign lookSubButtons={"coOperation":"协办意见","hisRecord":"流转历史","hisReview":"审核历史"}>
    <#assign selectButtons=[{"name":"其他菜单","icon":"icon-edit","subButtons":lookSubButtons}]>
</#if>

<#if editState="isCoOperation">
    <#assign lookSubButtons={"hisRecord":"流转历史","hisReview":"审核历史"}>
    <#assign selectButtons=[{"name":"其他菜单","icon":"icon-edit","subButtons":lookSubButtons}]>
</#if>

<script language="JavaScript">

	var actName="weekRecordAction";
	var domainName="weekRecord";

	function opt_changeFgLeader(){
		openReference('WeekRecord','fgLeader','newFgLeaderId=value1&newFgLeaderUserName=value2&inParams=${(fgLeaderIds)?if_exists}');
 	}



</script>
</head>
<body scroll="auto">
 <#-- 生成按钮 -->
<div class="topDiv">
	<#include "/common/pager_style/pageButtonsEx.ftl" encoding="UTF-8">
</div><!-- end #topDiv -->
<div id="mainDiv">
	<div id="centerDiv" style="bottom:31px">
		<div id="body">
<#-- 修改：form的名字 -->
<form name="dictALForm" action="" method="post" onsubmit="return checkForm();">
	<input type="hidden" id="id" name="id" value="${(weekRecord.id)?if_exists}"/>
	<input type="hidden" name="page.offset" id="page.offset" value="${(page.offset)?if_exists}" >
	<input type="hidden" name="page.pageSize" id="page.pageSize" value="${(page.pageSize)?if_exists}">
	<input type="hidden" name="weekFormId" id="weekFormId" value="${(weekFormId)?if_exists}">
	<#--weekRecord参数-->
	<input type="hidden" id="weekRecord.id" name="weekRecord.id" value="${(weekRecord.id)?if_exists}"/>
	<input type="hidden" id="weekRecord.formCode" name="weekRecord.formCode" value="${(weekRecord.formCode)?if_exists}"/>
	<input type="hidden" id="weekRecord.firstCreateTime" name="weekRecord.firstCreateTime" value="${(weekRecord.firstCreateTime)?if_exists}"/>
	<input type="hidden" id="weekRecord.lwDocDataId" name="weekRecord.lwDocDataId" value="${(weekRecord.lwDocDataId)?if_exists}"/>
	<input type="hidden" id="weekRecord.zwDataId" name="weekRecord.zwDataId" value="${(weekRecord.zwDataId)?if_exists}"/>
	<input type="hidden" id="weekRecord.swDocDataId" name="weekRecord.swDocDataId" value="${(weekRecord.swDocDataId)?if_exists}"/>
	<input type="hidden" id="weekReview.applyType" name="weekReview.applyType" value="${(weekReview.applyType)?if_exists}"/>
	<input type="hidden" id="weekRecord.wfEntityId" name="weekRecord.wfEntityId" value="${(weekRecord.wfEntityId)?if_exists}"/>

	<#--其他参数-->
	<input type="hidden" name="newReturnOpinion" id="newReturnOpinion" value="${(newReturnOpinion)?if_exists}">
	<input type="hidden" name="editState" id="editState" value="${(editState)?if_exists}">
	<input type="hidden" name="swUnitTypeValue" id="swUnitTypeValue" value="ORG_SYS">
	<input type="hidden" name="sfbTypeValue" id="sfbTypeValue" value="ORGS_SYS">
	<input type="hidden" name="isDraftSave" id="isDraftSave" value="${(isDraftSave)?if_exists}">
	<input type="hidden" name="isDraft" id="isDraft" value="${(isDraft)?if_exists}">
	<input type="hidden" name="nowDateAddFifteen" id="nowDateAddFifteen" value="${(nowDateAddFifteen)?if_exists}">
	<input type="hidden" name="nowDateAddSeven" id="nowDateAddSeven" value="${(nowDateAddSeven)?if_exists}">
	<input type="hidden" name="nowDateAddFive" id="nowDateAddFive" value="${(nowDateAddFive)?if_exists}">
	<input type="hidden" name="nowDateAddThree" id="nowDateAddThree" value="${(nowDateAddThree)?if_exists}">
	<input type="hidden" name="nowDateAddTwo" id="nowDateAddTwo" value="${(nowDateAddTwo)?if_exists}">	
	<input type="hidden" name="fgLeaderIds" id="fgLeaderIds" value="${(fgLeaderIds)?if_exists}">	
	<#--正文-->
	<#--		当前用户相关信息		-->
	<input type="hidden" name="cur_userId" 			id="cur_userId" 			value="${(currentUser.id)?if_exists}"/>
	<input type="hidden" name="cur_userCode" 		id="cur_userCode" 			value="${(currentUser.code)?if_exists}"/>
	<input type="hidden" name="cur_userName" 		id="cur_userName" 			value="${(currentUser.name)?if_exists}"/>
	<input type="hidden" name="cur_fullName" 		id="cur_fullName" 			value="${(currentUser.fullName)?if_exists}"/>
	<input type="hidden" name="cur_deptId" 			id="cur_deptId" 			value="${(currentUser.deptId)?if_exists}"/>
	<input type="hidden" name="cur_deptName" 		id="cur_deptName" 			value="${(currentUser.deptName)?if_exists}"/>
	<input type="hidden" name="cur_fullDeptName"	id="cur_fullDeptName" 		value="${(currentUser.fullDeptName)?if_exists}"/>
	<input type="hidden" name="cur_roleCodes"		id="cur_roleCodes" 			value="${convertArrayToString(currentUser.roleCodes)}"/>
	<input type="hidden" name="cur_groupCodes"		id="cur_groupCodes" 		value="${convertArrayToString(currentUser.groupCodes)}"/>
	<input type="hidden" name="cur_orgId"		    id="cur_orgId" 		        value="${(currentUser.orgId)?if_exists}"/>
	<input type="hidden" name="cur_orgName"		    id="cur_orgName"			value="${(currentUser.orgName)?if_exists}"/>
	<input type="hidden" name="cur_fullOrgName"		id="cur_fullOrgName"		value="${(currentUser.fullOrgName)?if_exists}"/>
	<input type="hidden" name="cur_orgDeptRootId" 	id="cur_orgDeptRootId"		value="${(currentUser.orgDeptRootId)?if_exists}"/>
    <input type="hidden" name="cur_orgDeptRootName" id="cur_orgDeptRootName" 	value="${(currentUser.orgDeptRootName)?if_exists}"/>
    <input type="hidden" name="cur_s3" 			id="cur_s3" 			value="${(currentUser.s3)?if_exists}"/>
	<#--		当前日期、时间等信息	-->
	<input type="hidden" name="cur_now"				id="cur_now" 				value="${(currentUser.now)?if_exists}"/>
	<input type="hidden" name="cur_date"			id="cur_date" 				value="${(currentUser.date)?if_exists}"/>
	<input type="hidden" name="cur_time"			id="cur_time" 				value="${(currentUser.time)?if_exists}"/>
	    <#--   查看该流程是否有盖过章(天谷)的版式文件 -->
    <input type="hidden" name="isHasSeal" id="isHasSeal" value="${(isHasSeal)?if_exists?string}"	/>
    <input type="hidden" name="sealPdfId" id="sealPdfId" value="${(sealPdfId)?if_exists?string}"	/>
    <input type="hidden" name="canSealPdfId" id="canSealPdfId" value="${(canSealPdfId)?if_exists?string}"	/>
    <#-- 路径参数 -->
    <input type="hidden" name="pathParam" 			id="pathParam" 			value="${(request.contextPath)?if_exists}"/>
	
	<#-- end -->
	<div class="ui-com-main">
	  <div class="ui-formfield">
		<table class="tbl">
			<caption><#if (entityTitle)?exists>${(entityTitle)?if_exists}</#if></caption>
			
			<tbody>
			<#if editState="modify">			
			<#include "/week/formStyle/addForm.ftl" encoding="UTF-8"/><!--新建修改页面-->		
			<#else>	
			<#include "/week/formStyle/elseForm.ftl" encoding="UTF-8"/><!--其他页面-->		
			</#if>
			</tbody>			
		</table>
	<!--正文str-->
	  <div style="padding-left:21px">
        <input type='button' style = "font-size:15px" id="buttonSvrFile" value="隐藏正文" onclick="showWord();return false;">
       		</div>
         <div  id='wordBox'>
         <#if (!isHasSeal?exists || (isHasSeal!="1"&&isHasSeal!="2"))>
        	<div  id='wordFile'>
			<a name="#word"></a>
			<#-- 导入word控件 -->
			<#include "/common/wordcontrol.ftl" encoding="UTF-8"/>
			</div>
		<#else>
			<iframe border=0 id='divTgContain' src="./workflow/jet/TGPDFPlugInCtrlView.htm" width='100%' height='850px' ></iframe>
		</#if>
		</div>
	</div>
	<!--正文end-->
	<!--附件str-->
		<#include "/week/formStyle/attachment.ftl" encoding="UTF-8"/><!--附件-->
	<!--附件end-->	
 	</div><!-- end #ui-com-main -->
 	<!---->
 	<!---->
 	
 	
</div><!-- end #ui-formfield -->
</form>
		</div><!-- end #centerDiv -->
	</div> <!-- end #body -->  
</div><!-- end #mainDiv -->

<!--================	转成新流程时的相关信息	====================-->
	<div id="optConvert" style="display:none;">
					<table class="tbl">
			<tbody>
		  		<tr>
		    		<th width="20%">请选择收文流程：</th>
				    <td width="80%">&nbsp;
					    <select style="width:80%" id="wfDefineInfoId" name="wfDefineInfoId">
					    </select>
				   </td>
		  		</tr>
		  	</tbody>
		</table>
	</div>
<!--================	转成新流程时的相关信息	====================-->

<!--================	直接退回str	====================--> 
 
    <#include "/week/WeekDirectReturn.ftl" encoding="UTF-8"/>
    
<!--================	直接退回str	====================--> 
 
	<#include "/week/models/dialog.ftl" encoding="UTF-8"/>
</body>
</html>